<link href="${rc.getContextPath()}/manage/css/dwzCustomCss/dwz.custom.css?v=${ver}" rel="stylesheet" type="text/css">
<form method="post" action="${rc.getContextPath()}/manage/material/saveMaterial" class=" pageForm required-validate" onsubmit="return tsubmit(this);">
    <div class="pageContent">
        <div class="pageFormContent">
            <fieldset>
                <input type="hidden" name="navTabId" value="${navTabId!''}"> 
                <input type="hidden" name="id" value="<#if (material.materialCode)??>${material.materialText!''}</#if>"> 
                <input type="hidden" id="process" name="process" value="${process!''}">
                <dl>
            
                        <dt><@label key="materialCode.C,colon">物料编号：</@label></dt> 
                        <dd><input  class="required  alphanumeric toUp" readonly name="materialCode" value="<#if (material.materialCode)??>${material.materialCode!''}</#if>"  type="text" maxlength="40"/> </dd>
                </dl>
                <dl>
                        <dt><@label key="materialText.C,colon">物料描述：</@label></dt> 
                        <dd><input class="required" readonly name="materialText" value="<#if (material.materialText)??>${material.materialText!''}</#if>" type="text" maxlength="60" />  </dd>
                </dl>
                <dl>
                        <dt><@label key="materialType.C,colon">物料类型：</@label></dt>
                        <dd><input class="required" readonly name="materialTypeCode" type="text" maxlength="60" 
                        	value="${material.materialTypeCode}-${material.materialTypeText}"/> 
                        </dd>
                        <!-- 
                        <dd><select disabled name="materialTypeCode"> <#list materialTypes as type>
                            <option value="${type.materialTypeCode}"<#if material.materialTypeCode?? && material.materialTypeCode == type.materialTypeCode> selected="selected"</#if>>${type.materialTypeCode}-${type.typeText}</option> </#list>
                        </select></dd> 
                        -->
                </dl>
				<dl>
				    <dt><@label key="defaultWorkCenter.C,colon">默认工作中心：</@label></dt> 
				    <dd><input class="required" readonly name="materialTypeCode" type="text" maxlength="60" 
                        value="${material.workCenterCode}-${material.workCenterText}"/> </dd>
				    <!-- 
				    <dd><select disabled style="width:147px;" name="workCenterCode">
					    <option value=""></option>
					    <#if workCenters??><#if workCenters?size>0><#list workCenters as workCenter>
					    <option value="${workCenter.workCenterCode!''}"
					         <#if  (material.materialCode)?? && material.workCenterCode??&& material.workCenterCode==workCenter.workCenterCode> selected="selected" 
					         </#if>
					         >${workCenter.workCenterCode!''}-${workCenter.workCenterText!''}</option>
					    </#list></#if></#if>
						</select>
					</dd>
					 -->
				</dl>
				<dl>
		            <dt><@label key="bomCode.C,colon">物料清单编号：</@label></dt>
		            <dd>
		                <input readonly="readonly" id="bomLookup.bomCode" name="bomCode" value="<#if (material.bomCode)??>${material.bomCode!''}</#if>" type="text" />
		            </dd>
		        </dl>
		        <dl>
		            <dt><@label key="bomText.C,colon">物料清单描述：</@label></dt>
		            <dd><input id="bomLookup.bomText" name="bomText" type="text" readonly="readonly" value="<#if (material.bomText)??>${material.bomText!''}</#if>"/></dd>
		        </dl>
		        <dl>
                    <dt><@label key="makelotsize.C,colon">生产批量：</@label></dt> 
                    <dd><input class="readonly" readonly name="makelotsize" value="${material.makelotsize!''}" type="text" maxlength="60" />  </dd>
                </dl>
                <dl>
                    <dt><@label key="materialspec.C,colon">物料规格：</@label></dt> 
                    <dd><input class="readonly" readonly name="materialspec" value="${material.materialspec!''}" type="text" maxlength="60" />  </dd>
                </dl>
                <dl>
		        	<dt><@label key="LeadTime.C">提前期：</@label>(<@label key="day.C">日</@label>)<@label key="colon">:</@label></dt> 
		        	<dd><input class="readonly" name="materialLeadTimeNum" value="${material.materialLeadTimeNum!''}" type="text" maxlength="60" />  </dd>
		        </dl>
				<dl class="nowrap">
					<dt>&nbsp;</dt>
					<dd>
					   	<label style="width: 80px;"><input disabled type="checkbox" name="makeFlag" value="1"<#if (material.makeFlag)?? && (material.makeFlag == 1)> checked="true"</#if>><@label key="makeFlag.C">自制件</@label></label>
						<label style="width: 80px;"><input disabled type="checkbox" name="buyFlag" value="1"<#if (material.buyFlag)?? && (material.buyFlag == 1)> checked="true"</#if>><@label key="buyFlag.C">采购件</@label></label>
						<label style="width: 80px;"><input disabled type="checkbox" name="operationScheduleFlag" value="1"<#if (material.operationScheduleFlag)?? && (material.operationScheduleFlag == 1)> checked="true"</#if>><@label key="operationScheduleFlag.C">工序派工</@label></label>
			       	</dd>
				</dl>
                <dl class="nowrap">
                    <dd>
                       
                        <div  class="panel"  currentIndex="0" eventType="click" style="width: 605px;margin: 0;">
                        <h1><@label key="process.C">工艺路线</@label></h1>
                        <div>
                                    <table class="table border" width="100%" layoutH="400">
                                        <thead>
                                            <tr>
                                                
                                                <th width="100"><@label key="cmprocess_code.C">工艺编号</@label></th>
                                                <th width="100"><@label key="cmprocess_name.C">工艺名称</@label></th>
                                                <th width="100"><@label key="defaultProcess.C">默认工艺</@label></th>
                                            </tr>
                                        </thead>
                                        <tbody id="processtbody">
                                            <#if processes??><#if (processes?size>0)> <#list processes as process>
                                            <tr id="process_${process.processCode!''}" target="process_code" rel="${process.processCode!''}">
                                            
                                                <td width="100">${process.processCode!''}</td>
                                                <td width="100">${process.processText!''}</td>
                                                <td width="100">
                                                <input disabled type="radio" name="processCode" value="${process.processCode!''}"                                            
                                                <#if material.processCode?? && material.processCode == process.processCode> checked</#if>/>
                                                </td>
                                            </tr>
                                            </#list> </#if> </#if>
                                        </tbody>
                                    </table>
                                    </div>
                        </div>
                    </dd>
                </dl>
            </fieldset>
        </div>
        <#if (material.materialCode)??> 
            <#assign createInfo=material/>
            <#include "/common/createInfo.html">
        </#if>
        <div class="formBar">
            <ul>
                <li><div class="buttonActive">
                        <div class="buttonContent">
                            <button type="button" class="close"><@label key="close.B">关闭</@label></button>
                        </div>
                    </div>
                </li>
            </ul>
        </div>
    </div>
    <#macro bpTree children> <#if children?? && children?size gt 0> <#list children as child>
    <li><a tvalue="${child.menuCode}" tname="${child.menuText}"<#if (child.isChecked)?? && (child.isChecked == 1)> checked="true"</#if>>${child.menuText}</a> <#if child.children?? &&child.children?size gt 0>
        <ul><@bpTree children=child.children />
        </ul> </#if> </#list> </#if> </#macro>
</form>


